package com.example.metodo_post;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;

public class menu_productos extends Activity  {
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.menu_productos);
		
		final String server_url = getIntent().getStringExtra("server_url");
		
		ImageButton compus = (ImageButton) findViewById(R.id.compus);
		ImageButton celus = (ImageButton) findViewById(R.id.celus);
		ImageButton miselanios = (ImageButton) findViewById(R.id.miselanios);
		
		compus.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intento = new  Intent(getApplicationContext(),lista_articulos.class);
				intento.putExtra("server_url", server_url); 
				intento.putExtra("cat_id", "2");
				startActivity(intento);
			}
		});
		
		celus.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intento = new  Intent(getApplicationContext(),lista_articulos.class);
				intento.putExtra("server_url", server_url); 
				intento.putExtra("cat_id", "1");
				startActivity(intento);
			}
		});


		miselanios.setOnClickListener(new View.OnClickListener() {
	
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intento = new  Intent(getApplicationContext(),lista_articulos.class);
				intento.putExtra("server_url", server_url); 
				intento.putExtra("cat_id", "3");
				startActivity(intento);
			}
		});
		
	}
}
